using System;
using System.Threading.Tasks;
using Zhao.Common.Helper;
using Zhao.Models.DTO;
using Zhao.Models.Entity;

namespace Zhao.IServer
{
    /// <summary>
    /// 结算记录服务接口
    /// </summary>
    public interface ISettlementRecordService : IBaseService<SettlementRecord>
    {

        /// <summary>
        /// 查询结算记录
        /// </summary>
        /// <param name="queryParams">查询参数</param>
        /// <returns>分页结果</returns>
        Task<PageModel<SettlementRecordDto>> QuerySettlementRecordsAsync(SettlementRecordQueryParams queryParams);

        /// <summary>
        /// 查询场地预约的结算记录
        /// </summary>
        /// <param name="queryParams">查询参数</param>
        /// <returns>分页结果</returns>
        Task<PageModel<FieldSettlementRecordDto>> QueryFieldSettlementRecordsAsync(SettlementRecordQueryParams queryParams);

        /// <summary>
        /// 查询活动的结算记录
        /// </summary>
        /// <param name="queryParams">查询参数</param>
        /// <returns>分页结果</returns>
        Task<PageModel<ActivitySettlementRecordDto>> QueryActivitySettlementRecordsAsync(SettlementRecordQueryParams queryParams);

        /// <summary>
        /// 根据ID获取结算记录详情
        /// </summary>
        /// <param name="settlementId">结算ID</param>
        /// <returns>结算记录详情</returns>
        Task<ApiResult<SettlementRecordDto>> GetSettlementRecordByIdAsync(int settlementId);

        /// <summary>
        /// 获取场馆结算统计
        /// </summary>
        /// <param name="venueId">场馆ID</param>
        /// <param name="startTime">开始时间</param>
        /// <param name="endTime">结束时间</param>
        /// <returns>统计结果</returns>
        Task<ApiResult> GetVenueSettlementStatsAsync(Guid venueId, DateTime? startTime = null, DateTime? endTime = null);
    }
}